<template>
  <el-form label-width="120px">
    <el-form-item label="规则链名称"> {{ form.name }} </el-form-item>
    <el-form-item label="规则链描述"> {{ form.info }}</el-form-item>
    <el-form-item :label="langMsg?.updatedby || '更新人'"
      >{{ form.updateUser }}
    </el-form-item>
    <el-form-item :label="langMsg?.updatetime || '更新时间'">
      {{ form.updateTime }}</el-form-item
    >
  </el-form>
</template>
<script lang="ts" setup>
import { ref, watch, inject } from "vue";
// import { byIdGetChain } from '@/api/RuleEngine'
const props = defineProps({
  id: Number,
});
const apis: any = inject("apis");
const langMsg:any = inject("langMsg");
interface Details {
  factId?: number;
  name?: string;
  info?: string;
  activeFlag?: string;
  factName?: string;
  updateUser?: string;
  updateTime?: string;
}
const form = ref<Details>({});
const getDetail = async () => {
  let res = await apis?.byIdGetChain(props.id);
  form.value = res.data.data;
};
watch(
  () => props.id,
  () => {
    getDetail();
  },
  {
    immediate: true,
  }
);
</script>
